<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
	<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
	
		   <script type="text/javascript">
        function getImage()
        {
        var path ="${approot}/validateCodeServlet?"+(new Date().getTime());
        var preImage = document.getElementById("displayImage");
        preImage.innerHTML = "";
        var imageZone = document.createElement('img');
        imageZone.setAttribute('id','imageZone');
        //提取服务器上的图片显示下来:
        imageZone.setAttribute('src',path);
        preImage.appendChild(imageZone);
        } 
        
        function do_login(){
	        var type = document.getElementById('type').value;
	        if(type == 1)
	        	document.getElementById('actionName').action = '${approot}/main/login/1';
	        else if(type == 2)
	       		document.getElementById('actionName').action = '${approot}/main/login/2';
	       	document.action.submit();
        }
        </script>
	
  </head>

  <body style="background:#F5F6F8">

<div id="login_outer">
  <div id="login_middle">
   <div id="login_inner">
    <div id="login_con">
	 <div id="login_ct">
	  <div id="login_tx">
	   <form action="" method="post" id="actionName" name="action">
	   <div class="left , login_tx_le">
	   <label>用户类型</label> <select id="type" style="text-align: left;width: 200px"><option value="1">个人用户</option><option value="2" selected="selected">系统用户</option></select> <p class="clear"></p>
	  <br/> <label>用户名：</label> <input type="text" name="name" value="admin" id="name"/> <p class="clear"></p>
	    
	    <label style="letter-spacing:2px;">密 码：</label><input type="password" name="password" value="111111" id="password"/> <p class="clear"></p>
	   	   <label>验证码：</label>
	   <input type="text" name="vcode" id="vcode" style="width:75px;">
	   <div id="displayImage"><img id="vimage" alt="" src="${approot}/validateCodeServlet"></div> 
	   <a href="#" onclick="getImage();">换一张</a>
	   <p class="clear"></p>
	   
	    <label> <font color='red'>${loginError}</font> </label>
	    </div>
	   <div class="right">
	    <input type="button" name="" value="" class="login_sub" onclick="do_login();">
	   </div>
	   </form>
	  </div>
	 </div>
	</div>
   </div>
  </div>
 </div>
 
<!-- <div id="login_f">Copyright &copy;2010 Baihong Software All Rights Reserved</div> --> 
</body>
</html>
